/*
*Copyright (c) Nikhil Jain.
*Project ICARUS, communications and 
*artificial intelligence.
*/



/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
 */
package javadrone.statedata;

//~--- non-JDK imports --------------------------------------------------------

import javadrone.Sensor;

//~--- JDK imports ------------------------------------------------------------

import java.io.Serializable;

/**
 *
 * @author Nikzzay
 * install in both client and server
 */
public class BootData extends StateData<BootData.BootState> {
    private static final Sensor DESCRIPTOR = Sensor.BOOT_STATE;

    public BootData(BootState ns) {
        super(ns, DESCRIPTOR);
    }

    @Override
    public String toString() {
        return "BOOT DATA: " + getData().toString();
    }

    public static class BootState implements Serializable {
        BootFlag bootFlag;

        public enum BootFlag { BOOT_ERROR, BOOT_SUCCESS, BOOT_FAILURE, BOOT_REBOOT, BOOT_KILLED }

        public BootState(BootFlag bootFlag) {
            this.bootFlag = bootFlag;
        }

        public BootFlag bootState() {
            return bootFlag;
        }

        @Override
        public String toString() {
            return "BOOT STATE: " + bootFlag;
        }
    }
}


//~ Formatted by Jindent --- http://www.jindent.com
